﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using HZ.Supervise.Model;

namespace HZ.Supervise.IBLL
{
    public interface IBLL_SpecialAuthority
    {
        /// <summary>
        /// 按条件查询医院采购权限
        /// </summary>
        /// <param name="where">sql语句</param>
        /// <param name="currentpage">当前页</param>
        /// <param name="pagesize">每页条数</param>
        /// <param name="totalrecord">总条数</param>
        /// <returns></returns>
       DataTable findHopitalAreaSortSourceByWhere(string where, int currentpage, int pagesize, out int totalrecord);
           /// <summary>
        /// 根据医院Id查询日志表
        /// </summary>
        /// <param name="hospitalId"></param>
        /// <returns></returns>
       DataTable GetAllHospitalLog(string hospitalId);
                 /// <summary>
        /// 禁用该医院的所有药品
        /// </summary>
        /// <param name="hospitalId"></param>
        /// <returns></returns>
       int UpdateAllHospitalGoods(HospitalGoods hospitalGoods,int  SortSource);
          /// <summary>
        /// 启用该医院的所有的药品
        /// </summary>
        /// <param name="hospitalId"></param>
        /// <returns></returns>
       int DeleteAllHospitalGoods(string hospitalId, int SortSource);
             /// <summary>
        /// 查询所有日志信息
        /// </summary>
        /// <param name="where"></param>
        /// <returns></returns>
        DataTable findAllHospitalGoodsDisableLog(string where);
             /// <summary>
        /// 插入日志
        /// </summary>
        /// <param name="hospitalGoodsDisableLog"></param>
        /// <returns></returns>
        int InsertHospitalGoodsDisableLog(HospitalGoodsDisableLog hospitalGoodsDisableLog);
         /// <summary>
        /// 查询出所有的被禁用药品
        /// </summary>
        /// <returns></returns>
         DataTable findAllHospitalGoodsDisable();
        /// <summary>
        /// 插入日志表
        /// </summary>
        /// <param name="hospitalGoodsLog"></param>
        /// <returns></returns>
        int InsertHospitalGoodsLog(HospitalGoodsLog hospitalGoodsLog);
        /// <summary>
        /// 根据批号，流水号删除已禁用的数据
        /// </summary>
        /// <param name="hospitalGoodsDisableList"></param>
        /// <returns></returns>
         int DeleteHospitalGoodsDisable(IList<HospitalGoodsDisable> hospitalGoodsDisableList);
        /// <summary>
        /// 新增药品批号禁用
        /// </summary>
        /// <param name="hospitalGoodsDisableList"></param>
        /// <returns></returns>
         int InsertHospitalGoodsDisable(IList<HospitalGoodsDisable> hospitalGoodsDisableList);
        /// <summary>
        /// 根据hospitalList删除
        /// </summary>
        /// <param name="hospotalGoodList"></param>
        /// <returns></returns>
       int DeleteHospitalGoods(IList<HospitalGoods> hospotalGoodList);
        /// <summary>
        /// 插入HospitalGoods表
        /// </summary>
        /// <param name="hospotalGoodList"></param>
        /// <returns></returns>
       int InsertHospitalGoods(IList<HospitalGoods> hospotalGoodList);
         /// <summary>
        /// 根据条件查询医院所禁用的药品
        /// </summary>
        /// <param name="HospitalID"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
       DataTable findHospitalGoodsByWhere(string where, string hospitalId, int currentpage, int pagesize, out int totalrecord);
                 /// <summary>
        /// 查询采购目录,关联被禁用的
        /// </summary>
        /// <param name="where"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
       DataTable findHospitalGoodsDisable(string where, int currentpage, int pagesize, out int totalrecord);
       /// <summary>
       /// 查询采购目录
       /// </summary>
       /// <param name="where"></param>
       /// <param name="currentpage"></param>
       /// <param name="pagesize"></param>
       /// <param name="totalrecord"></param>
       /// <returns></returns>
       DataTable findProcureCatalog(string where, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
       /// 查询撤废目录
        /// </summary>
        /// <param name="where"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
       DataTable findTAreaDeleteProcure(string where, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 查询调价目录
        /// </summary>
        /// <param name="where"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
       DataTable AreaPrice(string where, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 添加药品调价
        /// </summary>
        /// <param name="areaID"></param>
        /// <param name="goodsID"></param>
        /// <param name="Aprice"></param>
        /// <returns></returns>
       int InsertAreaPrice(string areaID, string goodsID, string Aprice, Boolean type, string Aadduserid);
        /// <summary>
        /// 修改药品调价
        /// </summary>
        /// <param name="areaID"></param>
        /// <param name="goodsID"></param>
        /// <param name="Aprice"></param>
        /// <returns></returns>
       int UpdataAreaPrice(string areaID, string goodsID, string Aprice, Boolean type, string Aadduserid);
       /// <summary>
       /// 添加撤废药品
       /// </summary>
       /// <param name="areaID"></param>
       /// <param name="goodsID"></param>
       /// <param name="Aprice"></param>
       /// <returns></returns>
       int InsertAreaDeleteProcure(string areaID, string goodsID,Boolean type, string Aadduserid);
     


        /// <summary>
        /// 更新医院采购权限
        /// </summary>
        /// <param name="has"></param>
        /// <returns></returns>
       int UpdateHopitalAreaSortSource(List<HZ.Supervise.Model.View.HopitalAreaSortSource> has);
       /// <summary>
       /// 获取历史修改记录
       /// </summary>
       /// <param name="id1">表主键</param>
       /// <param name="id2">历史： 0 医院采购范围，1地区采购药品 ，2地区采购价格</param>
       /// <returns></returns>
        List<T> GetHostory<T>(string id1,string id2,string id3,string id4) where T:new() ;

        /// <summary>
        /// 获取流水号在该用户地区下的价格和撤废情况
        /// </summary>
        /// <param name="ProcureCatalogid"></param>
        /// <param name="Areaid"></param>
        /// <returns></returns>
        DataTable GetProcureCatalogAllstate(string ProcureCatalogid, string Areaid);

        /// <summary>
        /// 更调价和地区控制
        /// </summary>
        /// <param name="sql"></param>
        /// <returns></returns>
        int UpdateChangeall(string sql);
    }
}
